﻿using DBCHM.Models;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace DBCHM.Service
{
    public interface IStoreService
    {
        Task<bool> InitAsync();

        /// <summary>
        /// 查询列表
        /// </summary>
        /// <returns></returns>
        Task<List<DbConnectConfigDto>> GetConfigListAsync();

        /// <summary>
        /// 查询配置
        /// </summary>
        /// <param name="dbConnectConfigDto"></param>
        /// <returns></returns>
        Task<bool> AddConfigAsync(DbConnectConfigDto dbConnectConfigDto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteConfigAsync(int id);

        /// <summary>
        /// 获取当前连接的库配置信息
        /// </summary>
        /// <returns></returns>
        Task<DbConnectConfigEntity> GetCurrentConfigAsync();
    }
}